<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class InitUpdate11 extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('box_skus', function (Blueprint $table) {
            $table->integer('return_money')->nullable()->comment('返售价格');
            $table->integer('return_score')->nullable()->comment('返售积分');
        });

        Schema::table('orders', function (Blueprint $table) {
            $table->integer('return_money')->nullable()->comment('返售价格');
            $table->integer('return_score')->nullable()->comment('返售积分');
            $table->integer('return_redpack')->nullable()->comment('返售红包');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('box_skus', function (Blueprint $table) {
            $table->dropColumn('return_money');
            $table->dropColumn('return_score');
        });

        Schema::table('orders', function (Blueprint $table) {
            $table->dropColumn('return_money');
            $table->dropColumn('return_score');
            $table->dropColumn('return_redpack');
        });
    }
}
